home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t9.d64
/
fast bam.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
71 lines
2 REM: C64 FAST BAM UTILITY
3 REM: CONFIGURATION: C64+1540/1 DISK
4 :
5 REM: USES M/C ROUTINE @ $C000
6 REM: STORES BIT MAP @ $C100
7 :
8 REM: M/C ROUTINE SELF LOADS
9 :
10 REM: PAUL BLAIR/PETER FLETCHER
11 REM: CANBERRA AUSTRALIA 5 FEB 84
12 :
15 IFPEEK(49152)=160THEN21
20 F=F+1:LOAD"BAMGET.D",8,1
21 M=53280:POKEM,15:POKEM+1,15
30 PRINT"[147][144][146] COMMODORE 64 DISK UTILITY"
35 PRINT" BLOCK ALLOCATION MAP (BAM)"
36 PRINT" PAUL BLAIR/PETER FLETCHER"
37 PRINT" CANBERRA AUSTRALIA FEB 84"
38 PRINT"[144] PLEASE INSERT DISK IN DRIVE"
40 PRINT" PRESS ANY KEY WHEN READY"
50 GETY$:IFY$=""THEN50
60 Y$="":X$=""
70 OPEN15,8,15:PRINT#15,"I0"
80 OPEN2,8,2,"#"
90 PRINT#15,"U1";2;0;18;0
100 PRINT#15,"B-P:"2;4
110 SYS49152 :REM CLEAR BUFFER
120 SYS49178 : REM READ BAM
130 CLOSE2:CLOSE15
140 POKEM,11:PRINT"[147][149] TRACKS[146] 11111111112222222222333333"
150 PRINT" 12345678901234567890123456789012345"
160 PRINT"[175][144] [175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
170 PRINT"S[146]0[144][167] [165]"
180 PRINT"E[146]1[144][167] [165]"
190 PRINT"C[146]2[144][167] [165]"
200 PRINT"T[146]3[144][167] [165]"
210 PRINT"O[146]4[144][167] [165]"
220 PRINT"R[146]5[144][167] [165]"
230 PRINT"S[146]6[144][167] [165]"
240 PRINT" 7[144][167] [165]"
250 PRINT" 8[144][167] [165]"
260 PRINT" 9[144][167] [165]"
270 PRINT"10[144][167] [165]"
280 PRINT"11[144][167] [165]"
290 PRINT"12[144][167] [165]"
300 PRINT"13[144][167] [165]"
310 PRINT"14[144][167] [165]"
320 PRINT"15[144][167] [165]"
330 PRINT"16[144][167] [165]"
340 PRINT"17[144][167] [207][183][183][183][183]"
350 PRINT"18[144][167] [207][183][183][183][183][183]"
360 PRINT"19[144][167] [207][183][183][183][183][183][183] [209][144]=USED"
370 PRINT"20[144][167] [165]"
380 PRINT" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
390 B=49408:FORT=1TO35
400 IFT<18THENA=20:GOTO440
410 IFT<25THENA=18:GOTO440
420 IFT<31THENA=17:GOTO440
430 A=16
440 FORS=0TOA:IFPEEK(B)=1ANDT<>18THENBF=BF+1
441 IFPEEK(B)=1THENB=B+1:GOTO460
450 PRINT""LEFT$(Y$,S+3)LEFT$(X$,T+2)""MID$("[209][160]",PEEK(B)+1,1);:B=B+1
460 NEXT:NEXT
470 PRINT""LEFT$(Y$,23)LEFT$(X$,21)"[144]BLOCKS FREE ="BF
480 PRINT""LEFT$(Y$,24)"[151] 'C' TO CONTINUE 'E' TO END ";
481 POKE2023,160:POKE56295,11
490 GETR$:IFR$=""THEN490
500 IFR$="E"THENPRINT"":END
510 IFR$="C"THENRUN
520 GOTO490